import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
export const children=[{
  path: '/home/desk',
  name: 'desk',
  component: () => import(/* webpackChunkName: "desk" */ '../views/desk/index.vue'),
  title:'工作台'
},{
  path: '/home/posts',
  name: 'posts',
  component: () => import(/* webpackChunkName: "posts" */ '../views/posts/index.vue'),
  title:'文章管理'
},{
  path: '/home/page',
  name: 'page',
  component: () => import(/* webpackChunkName: "page" */ '../views/page/index.vue'),
  title:'页面管理'
},{
  path: '/home/knowledge',
  name: 'knowledge',
  component: () => import(/* webpackChunkName: "knowledge" */ '../views/knowledge/index.vue'),
  title:'知识小册'
},{
  path: '/home/poster',
  name: 'poster',
  component: () => import(/* webpackChunkName: "poster" */ '../views/poster/index.vue'),
  title:'海报管理'
},{
  path: '/home/comment',
  name: 'comment',
  component: () => import(/* webpackChunkName: "comment" */ '../views/comment/index.vue'),
  title:'评论管理'
},{
  path: '/home/mail',
  name: 'mail',
  component: () => import(/* webpackChunkName: "mail" */ '../views/mail/index.vue'),
  title:'邮件管理'
},{
  path: '/home/file',
  name: 'file',
  component: () => import(/* webpackChunkName: "file" */ '../views/file/index.vue'),
  title:'文件管理'
},{
  path: '/home/search',
  name: 'search',
  component: () => import(/* webpackChunkName: "search" */ '../views/search/index.vue'),
  title:'搜索记录'
},{
  path: '/home/visit',
  name: 'visit',
  component: () => import(/* webpackChunkName: "visit" */ '../views/visit/index.vue'),
  title:'访问统计'
},{
  path: '/home/user',
  name: 'user',
  component: () => import(/* webpackChunkName: "user" */ '../views/user/index.vue'),
  title:'用户管理'
},{
  path: '/home/system',
  name: 'system',
  component: () => import(/* webpackChunkName: "system" */ '../views/system/index.vue'),
  title:'系统管理'
}]
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Login',
    component: () => import(/* webpackChunkName: "login" */ '../views/login/index.vue')
  },{
    path: '/home',
    name: 'Home',
    component: () => import(/* webpackChunkName: "home" */ '../views/home/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
